n=-20:1:20;k0=4;k1=-4;
x=sin(0.2*pi*n);
x1=sin(0.2*pi*(n+k0));%图像向左平移4
x2=sin(0.2*pi*(n+k1));%图像向右平移4
subplot(311);
stem(n,x,'filled');
subplot(312);
stem(n,x1,'filled');
subplot(313);
stem(n,x2,'filled');

